#include <stdio.h>
void main(){
    int a[10000];
    for (int i = 0; i < 10000; i++){scanf("%d",a);}
    int count=0;
    char c=getchar();
    while (a[count]!='\0'){
        if (c<'0'||c>='9')continue;
        if (a[count]==c)count++;
        else{printf("no");return;}
    }
    printf("yes");
}